﻿using Ayatta.Contract;
using Ayatta.Contract.Domain;
using System.Collections.Generic;

namespace Ayatta.Service.Category
{
    public class CategoryService : ICategoryService
    {
        private readonly CategoryManager manager;

        public CategoryService() : this(CategoryManager.Instance)
        {
        }

        public CategoryService(CategoryManager manager)
        {
            this.manager = manager;
        }

        public IList<ProductCategory> GetCategories(int parentId)
        {
            return manager.GetCategories(parentId);
        }

        public IList<CategoryProp> GetProps(int categoryId)
        {
            return manager.GetProps(categoryId);
        }
        public IList<CategoryPropValue> GetPropValues(int categoryId)
        {
            return manager.GetPropValues(categoryId);
        }
    }
}